package vn.fpt.fsoft.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import vn.fpt.fsoft.dao.LogonDAO;


public class LogonDAOImpl extends HibernateDaoSupport implements LogonDAO {

	public boolean logon(String userName, String pwd) {
		String query = "from User where userId ='" + userName
				+ "' and pwd ='" + pwd + "'";

		@SuppressWarnings("rawtypes")
		List list = getHibernateTemplate().find(query);

		if (list.size() > 0)
			return true;
		else
			return false;

	}
}
